Package com.cisco.pt.ipc.sim.impl
Class PrivilegeManagerImpl
java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.ProcessImpl
com.cisco.pt.ipc.sim.impl.PrivilegeManagerImpl
- All Implemented Interfaces:
IPCObject,PrivilegeManager,Process
Information provided by the PKI file:
\class PrivilegeManager
\brief PrivilegeManager handles and manipulates privileges on routers and switches.
\example network().getDevice("Router0").getProcess("PrivilegeManager")
- Author:
- Auto-generated
-
Field Summary
Fields inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
accessMessage, ipcFactory, packetTracerSession -
Constructor Summary
ConstructorsConstructorDescriptionPrivilegeManagerImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddCommand(String mode, String command, boolean bAll, int level) Information provided by the PKI file:getCommandForMode(String mode, String command) Information provided by the PKI file:getCommandForModeAt(String mode, int index) Information provided by the PKI file:intgetCommandForModeCount(String mode) Information provided by the PKI file:getModeAt(int index) Information provided by the PKI file:intInformation provided by the PKI file:booleanisCommandAdded(String commandStr) Information provided by the PKI file:booleanremoveCommand(String mode, String command) Information provided by the PKI file:Methods inherited from class com.cisco.pt.ipc.sim.impl.ProcessImpl
getOwnerDeviceMethods inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession, sendMessage, sendMessageWithReturn, translateToCommandStatusStringPairMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSessionMethods inherited from interface com.cisco.pt.ipc.sim.Process
getOwnerDevice
-
Constructor Details
-
PrivilegeManagerImpl
public PrivilegeManagerImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage)
-
-
Method Details
-
addCommand
Information provided by the PKI file:
\brief Adds the specified command to the specified mode at the specified privilege level. \param mode, the mode to add the command to. Valid modes: user, enable, global. \param command, the command of interest. \param bAll, true to include all, false to not include all. \param level, the privilege level. \return bool, true if successful, otherwise false.- Specified by:
addCommandin interfacePrivilegeManager- Parameters:
mode- Takes in a parameter of modecommand- Takes in a parameter of commandbAll- Takes in a parameter of bAlllevel- Takes in a parameter of level- Returns:
- boolean Returns a boolean
-
removeCommand
Information provided by the PKI file:
\brief Removes the specified command from the specified mode. \param mode, the mode to add the command to. Valid modes: user, enable, global. \param command, the command of interest. \return bool, true if successful, otherwise false.- Specified by:
removeCommandin interfacePrivilegeManager- Parameters:
mode- Takes in a parameter of modecommand- Takes in a parameter of command- Returns:
- boolean Returns a boolean
-
getModeCount
public int getModeCount()Information provided by the PKI file:
\brief Returns the number of modes. \return int, the number of modes.- Specified by:
getModeCountin interfacePrivilegeManager- Returns:
- int Returns a int
-
getModeAt
Information provided by the PKI file:
\brief Returns the mode at the specified index. \param index, the index of the mode of interest. \return string, the mode at the specified index.- Specified by:
getModeAtin interfacePrivilegeManager- Parameters:
index- Takes in a parameter of index- Returns:
- String Returns a String
-
getCommandForModeCount
Information provided by the PKI file:
\brief Returns the number of commands for the specified mode. \param mode, the mode of interest. Valid modes: user, enable, global. \return int, the number of commands for the specified mode.- Specified by:
getCommandForModeCountin interfacePrivilegeManager- Parameters:
mode- Takes in a parameter of mode- Returns:
- int Returns a int
-
getCommandForModeAt
Information provided by the PKI file:
\brief Returns the command string and CommandPrivilege object in the specified mode at the specified index. \param mode, the mode of interest. Valid modes: user, enable, global. \param index, the index of the command of interest. \return pair<string, CommandPrivilege@"CommandSet::SCommandPrivilege">, the command and CommandPrivilege object.- Specified by:
getCommandForModeAtin interfacePrivilegeManager- Parameters:
mode- Takes in a parameter of modeindex- Takes in a parameter of index- Returns:
- Pair<String, CommandPrivilege> Returns a Pair<String, CommandPrivilege>
-
getCommandForMode
Information provided by the PKI file:
\brief Returns the command string and CommandPrivilege object in the specified mode for the specified command. \param mode, the mode of interest. Valid modes: user, enable, global. \param command, the command of interest. \return pair<string, CommandPrivilege@"CommandSet::SCommandPrivilege">, the command and CommandPrivilege object.- Specified by:
getCommandForModein interfacePrivilegeManager- Parameters:
mode- Takes in a parameter of modecommand- Takes in a parameter of command- Returns:
- Pair<String, CommandPrivilege> Returns a Pair<String, CommandPrivilege>
-
isCommandAdded
Information provided by the PKI file:
\brief Returns true if the command is already added, otherwise false. \param commandStr, command string to check for. \return bool, true if the command is already added, otherwise false.- Specified by:
isCommandAddedin interfacePrivilegeManager- Parameters:
commandStr- Takes in a parameter of commandStr- Returns:
- boolean Returns a boolean
-